// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import { ValidationProvider, extend } from 'vee-validate'
import { required, email } from 'vee-validate/dist/rules'

extend('required', {
  ...required,
  message: 'This field is required'
})
extend('email', {
  ...email,
  message: 'This email is invalide'
})

window.axios = axios
axios.defaults.baseURL = 'http://127.0.0.1:3333'

Vue.component('ValidationProvider', ValidationProvider)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App, ValidationProvider },
  template: '<App/>',
  data: () => ({
    value: ''
  })
})
